package utils;

import java.util.Comparator;

import fragment.Fragment;

public class FragmentComparator implements Comparator<Fragment>{

	@Override
	public int compare(Fragment o1, Fragment o2) {
		
		//The fragment with the most stimulation is the lesser (so the most stimulated is at the top of the list)
		
		if (o1.getCurrentStimulation()<o2.getCurrentStimulation()) return 1;
		
		if (o1.getCurrentStimulation()>o2.getCurrentStimulation()) return -1;
		
		return 0;
	}

}
